//
// CScene.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

import org.ryzom.nel.misc.CRGBA;
import org.ryzom.nel.misc.CVector;

public class CScene {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  public CScene(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  public static long getCPtr(CScene obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nel3dJNI.delete_CScene(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public static void registerBasics() {
    nel3dJNI.CScene_registerBasics();
  }

  public static void registerModel(SWIGTYPE_p_NLMISC__CClassId idModel, SWIGTYPE_p_NLMISC__CClassId idModelBase, SWIGTYPE_p_f___p_NL3D__CTransform creator) {
    nel3dJNI.CScene_registerModel(SWIGTYPE_p_NLMISC__CClassId.getCPtr(idModel), SWIGTYPE_p_NLMISC__CClassId.getCPtr(idModelBase), SWIGTYPE_p_f___p_NL3D__CTransform.getCPtr(creator));
  }

  public CScene(boolean bSmallScene) {
    this(nel3dJNI.new_CScene(bSmallScene), true);
  }

  public void initDefaultRoots() {
    nel3dJNI.CScene_initDefaultRoots(swigCPtr, this);
  }

  public void initQuadGridClipManager() {
    nel3dJNI.CScene_initQuadGridClipManager(swigCPtr, this);
  }

  public void setDriver(IDriver drv) {
    nel3dJNI.CScene_setDriver(swigCPtr, this, IDriver.getCPtr(drv), drv);
  }

  public IDriver getDriver() {
    long cPtr = nel3dJNI.CScene_getDriver(swigCPtr, this);
    return (cPtr == 0) ? null : new IDriver(cPtr, false);
  }

  public void release() {
    nel3dJNI.CScene_release(swigCPtr, this);
  }

  public void render(boolean doHrcPass) {
    nel3dJNI.CScene_render__SWIG_0(swigCPtr, this, doHrcPass);
  }

  public void render() {
    nel3dJNI.CScene_render__SWIG_1(swigCPtr, this);
  }

  public void beginPartRender() {
    nel3dJNI.CScene_beginPartRender(swigCPtr, this);
  }

  public void renderPart(UScene.TRenderPart rp, boolean doHrcPass) {
    nel3dJNI.CScene_renderPart__SWIG_0(swigCPtr, this, rp.swigValue(), doHrcPass);
  }

  public void renderPart(UScene.TRenderPart rp) {
    nel3dJNI.CScene_renderPart__SWIG_1(swigCPtr, this, rp.swigValue());
  }

  public void endPartRender() {
    nel3dJNI.CScene_endPartRender(swigCPtr, this);
  }

  public void updateWaitingInstances(double systemTimeEllapsed) {
    nel3dJNI.CScene_updateWaitingInstances(swigCPtr, this, systemTimeEllapsed);
  }

  public void setCam(CCamera cam) {
    nel3dJNI.CScene_setCam(swigCPtr, this, CCamera.getCPtr(cam), cam);
  }

  public CCamera getCam() {
    long cPtr = nel3dJNI.CScene_getCam(swigCPtr, this);
    return (cPtr == 0) ? null : new CCamera(cPtr, false);
  }

  public void setViewport(CViewport viewport) {
    nel3dJNI.CScene_setViewport(swigCPtr, this, CViewport.getCPtr(viewport), viewport);
  }

  public CViewport getViewport() {
    return new CViewport(nel3dJNI.CScene_getViewport(swigCPtr, this), true);
  }

  public CInstanceGroup findCameraClusterSystemFromRay(CInstanceGroup startClusterSystem, CVector startPos, CVector endPos) {
    long cPtr = nel3dJNI.CScene_findCameraClusterSystemFromRay(swigCPtr, this, CInstanceGroup.getCPtr(startClusterSystem), startClusterSystem, CVector.getCPtr(startPos), startPos, CVector.getCPtr(endPos), endPos);
    return (cPtr == 0) ? null : new CInstanceGroup(cPtr, false);
  }

  public CTransform createModel(SWIGTYPE_p_NLMISC__CClassId idModel) {
    long cPtr = nel3dJNI.CScene_createModel(swigCPtr, this, SWIGTYPE_p_NLMISC__CClassId.getCPtr(idModel));
    return (cPtr == 0) ? null : new CTransform(cPtr, false);
  }

  public void deleteModel(CTransform model) {
    nel3dJNI.CScene_deleteModel(swigCPtr, this, CTransform.getCPtr(model), model);
  }

  public void setShapeBank(CShapeBank pShapeBank) {
    nel3dJNI.CScene_setShapeBank(swigCPtr, this, CShapeBank.getCPtr(pShapeBank), pShapeBank);
  }

  public CShapeBank getShapeBank() {
    long cPtr = nel3dJNI.CScene_getShapeBank__SWIG_0(swigCPtr, this);
    return (cPtr == 0) ? null : new CShapeBank(cPtr, false);
  }

  public CTransformShape createInstance(String shapeName) {
    long cPtr = nel3dJNI.CScene_createInstance(swigCPtr, this, shapeName);
    return (cPtr == 0) ? null : new CTransformShape(cPtr, false);
  }

  public void createInstanceAsync(String shapeName, SWIGTYPE_p_p_NL3D__CTransformShape pInstance, CVector position, long selectedTexture) {
    nel3dJNI.CScene_createInstanceAsync(swigCPtr, this, shapeName, SWIGTYPE_p_p_NL3D__CTransformShape.getCPtr(pInstance), CVector.getCPtr(position), position, selectedTexture);
  }

  public void deleteInstance(CTransformShape model) {
    nel3dJNI.CScene_deleteInstance(swigCPtr, this, CTransformShape.getCPtr(model), model);
  }

  public CInstanceGroup getGlobalInstanceGroup() {
    long cPtr = nel3dJNI.CScene_getGlobalInstanceGroup(swigCPtr, this);
    return (cPtr == 0) ? null : new CInstanceGroup(cPtr, false);
  }

  public void animate(double atTime) {
    nel3dJNI.CScene_animate(swigCPtr, this, atTime);
  }

  public void addInstanceGroupForLightAnimation(CInstanceGroup ig) {
    nel3dJNI.CScene_addInstanceGroupForLightAnimation(swigCPtr, this, CInstanceGroup.getCPtr(ig), ig);
  }

  public void removeInstanceGroupForLightAnimation(CInstanceGroup ig) {
    nel3dJNI.CScene_removeInstanceGroupForLightAnimation(swigCPtr, this, CInstanceGroup.getCPtr(ig), ig);
  }

  public double getCurrentTime() {
    return nel3dJNI.CScene_getCurrentTime(swigCPtr, this);
  }

  public float getEllapsedTime() {
    return nel3dJNI.CScene_getEllapsedTime(swigCPtr, this);
  }

  public double getCurrentSystemTime() {
    return nel3dJNI.CScene_getCurrentSystemTime(swigCPtr, this);
  }

  public double getEllapsedSystemTime() {
    return nel3dJNI.CScene_getEllapsedSystemTime(swigCPtr, this);
  }

  public java.math.BigInteger getNumRender() {
    return nel3dJNI.CScene_getNumRender(swigCPtr, this);
  }

  public boolean isRendering() {
    return nel3dJNI.CScene_isRendering(swigCPtr, this);
  }

  public float getNbFaceAsked() {
    return nel3dJNI.CScene_getNbFaceAsked(swigCPtr, this);
  }

  public void setGroupLoadMaxPolygon(String group, long nFaces) {
    nel3dJNI.CScene_setGroupLoadMaxPolygon(swigCPtr, this, group, nFaces);
  }

  public long getGroupLoadMaxPolygon(String group) {
    return nel3dJNI.CScene_getGroupLoadMaxPolygon(swigCPtr, this, group);
  }

  public float getGroupNbFaceAsked(String group) {
    return nel3dJNI.CScene_getGroupNbFaceAsked(swigCPtr, this, group);
  }

  public void setPolygonBalancingMode(CScene.TPolygonBalancingMode polBalMode) {
    nel3dJNI.CScene_setPolygonBalancingMode(swigCPtr, this, polBalMode.swigValue());
  }

  public CScene.TPolygonBalancingMode getPolygonBalancingMode() {
    return CScene.TPolygonBalancingMode.swigToEnum(nel3dJNI.CScene_getPolygonBalancingMode(swigCPtr, this));
  }

  public void setMaxSkeletonsInNotCLodForm(long m) {
    nel3dJNI.CScene_setMaxSkeletonsInNotCLodForm(swigCPtr, this, m);
  }

  public long getMaxSkeletonsInNotCLodForm() {
    return nel3dJNI.CScene_getMaxSkeletonsInNotCLodForm(swigCPtr, this);
  }

  public CCoarseMeshManager getCoarseMeshManager() {
    long cPtr = nel3dJNI.CScene_getCoarseMeshManager(swigCPtr, this);
    return (cPtr == 0) ? null : new CCoarseMeshManager(cPtr, false);
  }

  public void setCoarseMeshLightingUpdate(short period) {
    nel3dJNI.CScene_setCoarseMeshLightingUpdate(swigCPtr, this, period);
  }

  public short getCoarseMeshLightingUpdate() {
    return nel3dJNI.CScene_getCoarseMeshLightingUpdate(swigCPtr, this);
  }

  public CLodCharacterManager getLodCharacterManager() {
    long cPtr = nel3dJNI.CScene_getLodCharacterManager(swigCPtr, this);
    return (cPtr == 0) ? null : new CLodCharacterManager(cPtr, false);
  }

  public void setLodCharacterManager(CLodCharacterManager m) {
    nel3dJNI.CScene_setLodCharacterManager(swigCPtr, this, CLodCharacterManager.getCPtr(m), m);
  }

  public void setLayersRenderingOrder(boolean directOrder) {
    nel3dJNI.CScene_setLayersRenderingOrder__SWIG_0(swigCPtr, this, directOrder);
  }

  public void setLayersRenderingOrder() {
    nel3dJNI.CScene_setLayersRenderingOrder__SWIG_1(swigCPtr, this);
  }

  public boolean getLayersRenderingOrder() {
    return nel3dJNI.CScene_getLayersRenderingOrder(swigCPtr, this);
  }

  public void enableLightingSystem(boolean enable) {
    nel3dJNI.CScene_enableLightingSystem(swigCPtr, this, enable);
  }

  public boolean isLightingSystemEnabled() {
    return nel3dJNI.CScene_isLightingSystemEnabled(swigCPtr, this);
  }

  public void setAmbientGlobal(CRGBA ambient) {
    nel3dJNI.CScene_setAmbientGlobal(swigCPtr, this, CRGBA.getCPtr(ambient), ambient);
  }

  public void setSunAmbient(CRGBA ambient) {
    nel3dJNI.CScene_setSunAmbient(swigCPtr, this, CRGBA.getCPtr(ambient), ambient);
  }

  public void setSunDiffuse(CRGBA diffuse) {
    nel3dJNI.CScene_setSunDiffuse(swigCPtr, this, CRGBA.getCPtr(diffuse), diffuse);
  }

  public void setSunSpecular(CRGBA specular) {
    nel3dJNI.CScene_setSunSpecular(swigCPtr, this, CRGBA.getCPtr(specular), specular);
  }

  public void setSunDirection(CVector direction) {
    nel3dJNI.CScene_setSunDirection(swigCPtr, this, CVector.getCPtr(direction), direction);
  }

  public void setLightGroupColor(long lightmapGroup, CRGBA color) {
    nel3dJNI.CScene_setLightGroupColor(swigCPtr, this, lightmapGroup, CRGBA.getCPtr(color), color);
  }

  public CRGBA getAmbientGlobal() {
    return new CRGBA(nel3dJNI.CScene_getAmbientGlobal(swigCPtr, this), true);
  }

  public CRGBA getSunAmbient() {
    return new CRGBA(nel3dJNI.CScene_getSunAmbient(swigCPtr, this), true);
  }

  public CRGBA getSunDiffuse() {
    return new CRGBA(nel3dJNI.CScene_getSunDiffuse(swigCPtr, this), true);
  }

  public CRGBA getSunSpecular() {
    return new CRGBA(nel3dJNI.CScene_getSunSpecular(swigCPtr, this), true);
  }

  public CVector getSunDirection() {
    return new CVector(nel3dJNI.CScene_getSunDirection(swigCPtr, this), true);
  }

  public long getNumLightGroup() {
    return nel3dJNI.CScene_getNumLightGroup(swigCPtr, this);
  }

  public CRGBA getLightmapGroupColor(long lightGroup) {
    return new CRGBA(nel3dJNI.CScene_getLightmapGroupColor(swigCPtr, this, lightGroup), true);
  }

  public CRGBA getAnimatedLightFactor(int animatedLightmap, long lightGroup) {
    return new CRGBA(nel3dJNI.CScene_getAnimatedLightFactor(swigCPtr, this, animatedLightmap, lightGroup), true);
  }

  public int getAnimatedLightNameToIndex(String name) {
    return nel3dJNI.CScene_getAnimatedLightNameToIndex(swigCPtr, this, name);
  }

  public void setMaxLightContribution(long nlights) {
    nel3dJNI.CScene_setMaxLightContribution(swigCPtr, this, nlights);
  }

  public long getMaxLightContribution() {
    return nel3dJNI.CScene_getMaxLightContribution(swigCPtr, this);
  }

  public void setLightTransitionThreshold(float lightTransitionThreshold) {
    nel3dJNI.CScene_setLightTransitionThreshold(swigCPtr, this, lightTransitionThreshold);
  }

  public float getLightTransitionThreshold() {
    return nel3dJNI.CScene_getLightTransitionThreshold(swigCPtr, this);
  }

  public void setGlobalWindPower(float gwp) {
    nel3dJNI.CScene_setGlobalWindPower(swigCPtr, this, gwp);
  }

  public float getGlobalWindPower() {
    return nel3dJNI.CScene_getGlobalWindPower(swigCPtr, this);
  }

  public void setGlobalWindDirection(CVector gwd) {
    nel3dJNI.CScene_setGlobalWindDirection(swigCPtr, this, CVector.getCPtr(gwd), gwd);
  }

  public CVector getGlobalWindDirection() {
    return new CVector(nel3dJNI.CScene_getGlobalWindDirection(swigCPtr, this), false);
  }

  public CHrcTrav getHrcTrav() {
    return new CHrcTrav(nel3dJNI.CScene_getHrcTrav(swigCPtr, this), false);
  }

  public CClipTrav getClipTrav() {
    return new CClipTrav(nel3dJNI.CScene_getClipTrav(swigCPtr, this), false);
  }

  public CLightTrav getLightTrav() {
    return new CLightTrav(nel3dJNI.CScene_getLightTrav(swigCPtr, this), false);
  }

  public CAnimDetailTrav getAnimDetailTrav() {
    return new CAnimDetailTrav(nel3dJNI.CScene_getAnimDetailTrav(swigCPtr, this), false);
  }

  public CLoadBalancingTrav getLoadBalancingTrav() {
    return new CLoadBalancingTrav(nel3dJNI.CScene_getLoadBalancingTrav(swigCPtr, this), false);
  }

  public CRenderTrav getRenderTrav() {
    return new CRenderTrav(nel3dJNI.CScene_getRenderTrav(swigCPtr, this), false);
  }

  public CTransform getRoot() {
    long cPtr = nel3dJNI.CScene_getRoot(swigCPtr, this);
    return (cPtr == 0) ? null : new CTransform(cPtr, false);
  }

  public CCluster getRootCluster() {
    long cPtr = nel3dJNI.CScene_getRootCluster(swigCPtr, this);
    return (cPtr == 0) ? null : new CCluster(cPtr, false);
  }

  public CParticleSystemManager getParticleSystemManager() {
    return new CParticleSystemManager(nel3dJNI.CScene_getParticleSystemManager(swigCPtr, this), false);
  }

  public void setAutomaticAnimationSet(CAnimationSet as) {
    nel3dJNI.CScene_setAutomaticAnimationSet(swigCPtr, this, CAnimationSet.getCPtr(as), as);
  }

  public CAnimationSet getAutomaticAnimationSet() {
    long cPtr = nel3dJNI.CScene_getAutomaticAnimationSet(swigCPtr, this);
    return (cPtr == 0) ? null : new CAnimationSet(cPtr, false);
  }

  public CAsyncTextureManager getAsyncTextureManager() {
    long cPtr = nel3dJNI.CScene_getAsyncTextureManager(swigCPtr, this);
    return (cPtr == 0) ? null : new CAsyncTextureManager(cPtr, false);
  }

  public void setAsyncTextureManager(CAsyncTextureManager mgr) {
    nel3dJNI.CScene_setAsyncTextureManager(swigCPtr, this, CAsyncTextureManager.getCPtr(mgr), mgr);
  }

  public void enableElementRender(UScene.TRenderFilter elt, boolean state) {
    nel3dJNI.CScene_enableElementRender(swigCPtr, this, elt.swigValue(), state);
  }

  public long getFilterRenderFlags() {
    return nel3dJNI.CScene_getFilterRenderFlags(swigCPtr, this);
  }

  public SWIGTYPE_p_NL3D__CScene__TSkeletonModelList__iterator appendSkeletonModelToList(CSkeletonModel skel) {
    return new SWIGTYPE_p_NL3D__CScene__TSkeletonModelList__iterator(nel3dJNI.CScene_appendSkeletonModelToList(swigCPtr, this, CSkeletonModel.getCPtr(skel), skel), true);
  }

  public void eraseSkeletonModelToList(SWIGTYPE_p_NL3D__CScene__TSkeletonModelList__iterator it) {
    nel3dJNI.CScene_eraseSkeletonModelToList(swigCPtr, this, SWIGTYPE_p_NL3D__CScene__TSkeletonModelList__iterator.getCPtr(it));
  }

  public SWIGTYPE_p_NL3D__CScene__TSkeletonModelList__iterator getSkeletonModelListBegin() {
    return new SWIGTYPE_p_NL3D__CScene__TSkeletonModelList__iterator(nel3dJNI.CScene_getSkeletonModelListBegin(swigCPtr, this), true);
  }

  public SWIGTYPE_p_NL3D__CScene__TSkeletonModelList__iterator getSkeletonModelListEnd() {
    return new SWIGTYPE_p_NL3D__CScene__TSkeletonModelList__iterator(nel3dJNI.CScene_getSkeletonModelListEnd(swigCPtr, this), true);
  }

  public void registerShadowCasterToList(CTransform sc) {
    nel3dJNI.CScene_registerShadowCasterToList(swigCPtr, this, CTransform.getCPtr(sc), sc);
  }

  public void unregisterShadowCasterToList(CTransform sc) {
    nel3dJNI.CScene_unregisterShadowCasterToList(swigCPtr, this, CTransform.getCPtr(sc), sc);
  }

  public SWIGTYPE_p_NL3D__CScene__TShadowCasterList__iterator getShadowCasterListBegin() {
    return new SWIGTYPE_p_NL3D__CScene__TShadowCasterList__iterator(nel3dJNI.CScene_getShadowCasterListBegin(swigCPtr, this), true);
  }

  public SWIGTYPE_p_NL3D__CScene__TShadowCasterList__iterator getShadowCasterListEnd() {
    return new SWIGTYPE_p_NL3D__CScene__TShadowCasterList__iterator(nel3dJNI.CScene_getShadowCasterListEnd(swigCPtr, this), true);
  }

  public void addSSSModelRequest(CSSSModelRequest req) {
    nel3dJNI.CScene_addSSSModelRequest(swigCPtr, this, CSSSModelRequest.getCPtr(req), req);
  }

  public void profileNextRender() {
    nel3dJNI.CScene_profileNextRender(swigCPtr, this);
  }

  public boolean isNextRenderProfile() {
    return nel3dJNI.CScene_isNextRenderProfile(swigCPtr, this);
  }

  public void setBenchRes(SWIGTYPE_p_NL3D__UScene__CBenchResults value) {
    nel3dJNI.CScene_BenchRes_set(swigCPtr, this, SWIGTYPE_p_NL3D__UScene__CBenchResults.getCPtr(value));
  }

  public SWIGTYPE_p_NL3D__UScene__CBenchResults getBenchRes() {
    long cPtr = nel3dJNI.CScene_BenchRes_get(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p_NL3D__UScene__CBenchResults(cPtr, false);
  }

  public void incrementProfileTriVBFormat(SWIGTYPE_p_std__mapT_unsigned_int_unsigned_int_t formatToTri, long vbFormat, long numTris) {
    nel3dJNI.CScene_incrementProfileTriVBFormat(swigCPtr, this, SWIGTYPE_p_std__mapT_unsigned_int_unsigned_int_t.getCPtr(formatToTri), vbFormat, numTris);
  }

  public void setFlareContext(long context) {
    nel3dJNI.CScene_setFlareContext(swigCPtr, this, context);
  }

  public long getFlareContext() {
    return nel3dJNI.CScene_getFlareContext(swigCPtr, this);
  }

  public long getShadowMapTextureSize() {
    return nel3dJNI.CScene_getShadowMapTextureSize(swigCPtr, this);
  }

  public void setShadowMapTextureSize(long size) {
    nel3dJNI.CScene_setShadowMapTextureSize(swigCPtr, this, size);
  }

  public long getShadowMapBlurSize() {
    return nel3dJNI.CScene_getShadowMapBlurSize(swigCPtr, this);
  }

  public void setShadowMapBlurSize(long bs) {
    nel3dJNI.CScene_setShadowMapBlurSize(swigCPtr, this, bs);
  }

  public void enableShadowPolySmooth(boolean enable) {
    nel3dJNI.CScene_enableShadowPolySmooth(swigCPtr, this, enable);
  }

  public boolean getEnableShadowPolySmooth() {
    return nel3dJNI.CScene_getEnableShadowPolySmooth(swigCPtr, this);
  }

  public void setShadowMapDistFadeStart(float dist) {
    nel3dJNI.CScene_setShadowMapDistFadeStart(swigCPtr, this, dist);
  }

  public float getShadowMapDistFadeStart() {
    return nel3dJNI.CScene_getShadowMapDistFadeStart(swigCPtr, this);
  }

  public void setShadowMapDistFadeEnd(float dist) {
    nel3dJNI.CScene_setShadowMapDistFadeEnd(swigCPtr, this, dist);
  }

  public float getShadowMapDistFadeEnd() {
    return nel3dJNI.CScene_getShadowMapDistFadeEnd(swigCPtr, this);
  }

  public void setShadowMapMaxCasterInScreen(long num) {
    nel3dJNI.CScene_setShadowMapMaxCasterInScreen(swigCPtr, this, num);
  }

  public long getShadowMapMaxCasterInScreen() {
    return nel3dJNI.CScene_getShadowMapMaxCasterInScreen(swigCPtr, this);
  }

  public void setShadowMapMaxCasterAround(long num) {
    nel3dJNI.CScene_setShadowMapMaxCasterAround(swigCPtr, this, num);
  }

  public long getShadowMapMaxCasterAround() {
    return nel3dJNI.CScene_getShadowMapMaxCasterAround(swigCPtr, this);
  }

  public void setVisualCollisionManagerForShadow(CVisualCollisionManager vcm) {
    nel3dJNI.CScene_setVisualCollisionManagerForShadow(swigCPtr, this, CVisualCollisionManager.getCPtr(vcm), vcm);
  }

  public CVisualCollisionManager getVisualCollisionManagerForShadow() {
    long cPtr = nel3dJNI.CScene_getVisualCollisionManagerForShadow(swigCPtr, this);
    return (cPtr == 0) ? null : new CVisualCollisionManager(cPtr, false);
  }

  public void setWaterCallback(IWaterSurfaceAddedCallback wcb) {
    nel3dJNI.CScene_setWaterCallback(swigCPtr, this, IWaterSurfaceAddedCallback.getCPtr(wcb), wcb);
  }

  public IWaterSurfaceAddedCallback getWaterCallback() {
    long cPtr = nel3dJNI.CScene_getWaterCallback(swigCPtr, this);
    return (cPtr == 0) ? null : new IWaterSurfaceAddedCallback(cPtr, false);
  }

  public void setLandscapePolyDrawingCallback(ILandscapePolyDrawingCallback lpd) {
    nel3dJNI.CScene_setLandscapePolyDrawingCallback(swigCPtr, this, ILandscapePolyDrawingCallback.getCPtr(lpd), lpd);
  }

  public ILandscapePolyDrawingCallback getLandscapePolyDrawingCallback() {
    long cPtr = nel3dJNI.CScene_getLandscapePolyDrawingCallback(swigCPtr, this);
    return (cPtr == 0) ? null : new ILandscapePolyDrawingCallback(cPtr, false);
  }

  public void insertInOcclusionQueryList(CFlareModel fm) {
    nel3dJNI.CScene_insertInOcclusionQueryList(swigCPtr, this, CFlareModel.getCPtr(fm), fm);
  }

  public void renderOcclusionTestMeshs() {
    nel3dJNI.CScene_renderOcclusionTestMeshs(swigCPtr, this);
  }

  public void setWaterEnvMap(CWaterEnvMap waterEnvMap) {
    nel3dJNI.CScene_setWaterEnvMap(swigCPtr, this, CWaterEnvMap.getCPtr(waterEnvMap), waterEnvMap);
  }

  public CWaterEnvMap getWaterEnvMap() {
    long cPtr = nel3dJNI.CScene_getWaterEnvMap(swigCPtr, this);
    return (cPtr == 0) ? null : new CWaterEnvMap(cPtr, false);
  }

  public void updateWaterEnvMaps(double time) {
    nel3dJNI.CScene_updateWaterEnvMaps(swigCPtr, this, time);
  }

  public CVertexBuffer getWaterVB() {
    return new CVertexBuffer(nel3dJNI.CScene_getWaterVB(swigCPtr, this), false);
  }

  public final static class TPolygonBalancingMode {
    public final static TPolygonBalancingMode PolygonBalancingOff = new TPolygonBalancingMode("PolygonBalancingOff", nel3dJNI.CScene_PolygonBalancingOff_get());
    public final static TPolygonBalancingMode PolygonBalancingOn = new TPolygonBalancingMode("PolygonBalancingOn");
    public final static TPolygonBalancingMode PolygonBalancingClamp = new TPolygonBalancingMode("PolygonBalancingClamp");
    public final static TPolygonBalancingMode CountPolygonBalancing = new TPolygonBalancingMode("CountPolygonBalancing");

    public final int swigValue() {
      return swigValue;
    }

    public String toString() {
      return swigName;
    }

    public static TPolygonBalancingMode swigToEnum(int swigValue) {
      if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
        return swigValues[swigValue];
      for (int i = 0; i < swigValues.length; i++)
        if (swigValues[i].swigValue == swigValue)
          return swigValues[i];
      throw new IllegalArgumentException("No enum " + TPolygonBalancingMode.class + " with value " + swigValue);
    }

    private TPolygonBalancingMode(String swigName) {
      this.swigName = swigName;
      this.swigValue = swigNext++;
    }

    private TPolygonBalancingMode(String swigName, int swigValue) {
      this.swigName = swigName;
      this.swigValue = swigValue;
      swigNext = swigValue+1;
    }

    private TPolygonBalancingMode(String swigName, TPolygonBalancingMode swigEnum) {
      this.swigName = swigName;
      this.swigValue = swigEnum.swigValue;
      swigNext = this.swigValue+1;
    }

    private static TPolygonBalancingMode[] swigValues = { PolygonBalancingOff, PolygonBalancingOn, PolygonBalancingClamp, CountPolygonBalancing };
    private static int swigNext = 0;
    private final int swigValue;
    private final String swigName;
  }

  public final static int MaxNumFlareContexts = nel3dJNI.CScene_MaxNumFlareContexts_get();

}
